using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace AuthorizationRequirementDemo.Host.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class ValueController : ControllerBase
    {
        [HttpGet("test")]
        [Authorize]
        public string GetTest()
        {
            return "Test";
        }

        [HttpGet("testrequirement")]
        [Authorize(Policy = "AtLeast21")]
        public string GetTestRequirement()
        {
            return "TestRequirement";
        }
    }
}